package cn.jiyun.config;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;

//属性注入类（属性读取类）
//@Configuration//配置类
@ConfigurationProperties(prefix = "user")//用于读取配置文件
public class UserProperties {
    //说明：属性注入类中的属性名称必须与配置文件中的key值（属性名）相同
    private String username;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public List<String> getHobbys() {
        return hobbys;
    }

    public void setHobbys(List<String> hobbys) {
        this.hobbys = hobbys;
    }

    private String password;
    private Integer age;
    private List<String> hobbys;

}
